package org.wlw.web.service.impl;

import org.wlw.web.anno.Resource;
import org.wlw.web.dao.ITopicDao;
import org.wlw.web.models.Topic;
import org.wlw.web.service.ITopicService;

import java.util.List;

public class TopicService extends BaseService implements ITopicService {
    private ITopicDao topicDao;

    @Resource
    public void setTopicDao(ITopicDao topicDao) {
        this.topicDao = topicDao;
    }

    @Override
    public void add(Topic t) {
        topicDao.add(t);
    }

    @Override
    public void update(Topic t) {
        topicDao.update(t);
    }

    @Override
    public void delete(int id) {
        topicDao.delete(id);
    }

    @Override
    public Topic load(int id) {
        return topicDao.load(id);
    }

    @Override
    public List<Topic> find(Topic topic) {
        return topicDao.find(topic);
    }
}
